<template>
    <div>
        <h3>欢迎您，{{ $store.getters.user}}</h3>
        <el-button @click="logout">注销</el-button>
    </div>
</template>

<script>
export default {
    methods: {
        logout() {
            this.$store.dispatch('user/resetToken')
            this.$router.push({
                path: '/login'
            });
        }
    },
}
</script>

<style lang="scss" scoped>
</style>